all: test

incs =-I. -I/usr/local/include/libbson-1.0/ -I/usr/local/include/libmongoc-1.0
libdirs=-L/usr/local/lib64

libs =-lbson-1.0 -lmongoc-1.0

srcs=$(wildcard ./*.cpp)
objs=$(patsubst %.cpp,%.o,$(srcs))

%.o:%.cpp
	g++ -g -c $< $(incs)

test:$(objs)
	g++ $^ -o $@ $(libdirs) $(libs)


clean:
	rm -rf ./test $(objs)
